package Chapter10_InnerClass;

import sun.security.krb5.internal.crypto.Des;

/**
 * Date: 2019/2/19
 * Time: 9:32
 * User: Driss.
 *
 * 10.1 创建内部类
 */
public class Parcel1 {
    class Contents{
        private int i = 11;
        public int value(){ return i;}
    }

    class Destination{
        private String label;
        Destination(String whereTo){
            this.label = whereTo;
        }
        String readLabel(){return label;}
    }

    public void ship(String dest){
        Contents c = new Contents();
        Destination d = new Destination(dest);

        System.out.println(d.label);
        System.out.println(d.readLabel());
    }

    public static void main(String[] args) {
        Parcel1 parcel1 = new Parcel1();
        parcel1.ship("Tasmania");
    }
}
